package chapter10.practice17;

/**
 * 掷骰（tou）子
 * Created by yangliwei on 2017/10/21.
 */
public class Crap extends Game {
    private Crap(String name) {
        super.name = name;
    }

    @Override
    public void play() {
        System.out.println(super.name);
    }

    public static GameFactory gameFactory = new GameFactory() {
        @Override
        public Game getGame() {
            return new Crap("Crap");
        }
    };
}
